<template>
  <div>
      <van-collapse v-model="activeNames">
      
        <van-collapse-item  title="组织用户" name="1">
            <van-sidebar v-model="activeKey" >
            <van-sidebar-item :title="i.name" v-for="(i,index) in list" :key="i.id" @change="onChange(index)"/>
            <!-- <van-sidebar-item title="标签名称" />
            <van-sidebar-item title="标签名称" /> -->
            </van-sidebar>

        </van-collapse-item>
         
        <!-- <van-collapse-item title="组织管理" name="1"></van-collapse-item>
        <van-collapse-item title="标题2" name="2">内容</van-collapse-item>
        <van-collapse-item title="标题3" name="3" >内容</van-collapse-item>
         <van-collapse-item title="标题4" name="4" >内容</van-collapse-item> -->
        </van-collapse>
  </div>
</template>
    
<script>
import axios from '../http/axios'
// import { Notify } from 'vant';
export default {
  data() {
    return {
      activeNames: ['1'],
      list:[],
      activeKey: 0

    };
  },
  methods:{
      getlist(){
          axios('/organizationlist?pid=0','get').then(res=>{
              console.log(res);
              this.list = res.list
          })
      },
     
  
  },
  mounted(){
      this.getlist()
  }
}
</script>

<style>

</style>